package com.karry.pojo;

import java.util.Date;
/**
 *  博客类
 * */
public class Blog {

    //唯一id
    private int id;
    //标题
    private String title;
    //内容
    private String content;
    //所属用户id
    private int userID;
    //所属类型id
    private int typeID;
    //发布时间
    private Date time;
    //发布经度
    private float lon;
    //发布纬度
    private float lan;
    //是否开放
    private int isOpen;
    //是否存在（相对删除）
    private int status;
    //所属用户账号
    private String userName;
    //所属类型名称
    private String typeName;
    //最后修改时间
    private Date lastUpdateTime;
    //浏览量
    private int viewCount;

    public Blog(int id, String title, String content, int userID, int typeID, Date time, float lon, float lan, int isOpen, int status, String userName, String typeName, Date lastUpdateTime, int viewCount) {
        this.id = id;
        this.title = title;
        this.content = content;
        this.userID = userID;
        this.typeID = typeID;
        this.time = time;
        this.lon = lon;
        this.lan = lan;
        this.isOpen = isOpen;
        this.status = status;
        this.userName = userName;
        this.typeName = typeName;
        this.lastUpdateTime = lastUpdateTime;
        this.viewCount = viewCount;
    }

    public Blog() {}

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getUserID() {
        return userID;
    }

    public void setUserID(int userID) {
        this.userID = userID;
    }

    public int getTypeID() {
        return typeID;
    }

    public void setTypeID(int typeID) {
        this.typeID = typeID;
    }

    public Date getTime() {
        return this.time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public float getLon() {
        return lon;
    }

    public void setLon(float lon) {
        this.lon = lon;
    }

    public float getLan() {
        return lan;
    }

    public void setLan(float lan) {
        this.lan = lan;
    }

    public int getIsOpen() {
        return isOpen;
    }

    public void setIsOpen(int isOpen) {
        this.isOpen = isOpen;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public Date getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(Date lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public int getViewCount() {
        return viewCount;
    }

    public void setViewCount(int viewCount) {
        this.viewCount = viewCount;
    }

    @Override
    public String toString() {
        return "Blog{" +
                "id=" + id +
                ", title='" + title + '\'' +
                ", content='" + content + '\'' +
                ", userID=" + userID +
                ", typeID=" + typeID +
                ", time=" + time +
                ", lon=" + lon +
                ", lan=" + lan +
                ", isOpen=" + isOpen +
                ", status=" + status +
                ", userName='" + userName + '\'' +
                ", typeName='" + typeName + '\'' +
                ", lastUpdateTime=" + lastUpdateTime +
                ", viewCount=" + viewCount +
                '}';
    }
}
